package com.zhiyou.app.shop.website.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou.app.shop.website.dao.IEpComplainDao;
import com.zhiyou.app.shop.website.dao.pojo.EpComplain;
import com.zhiyou.app.shop.website.service.IEpComplainService;

@Service(value="epComplainService")
public class EpComplainServiceImpl implements IEpComplainService {

	@Autowired
	private IEpComplainDao epComplainDao;

	public void save(EpComplain epComplain) {
		epComplainDao.save(epComplain);
	}

	public EpComplain findByEpId(String epId) {
		List<EpComplain> list = epComplainDao.findByProperty("epId", epId);
		if(list != null && list.size() >0){
			return list.get(0);
		}
		return null;
	}

	public EpComplain findById(Integer id) {
		return epComplainDao.findById(id);
	}
	
	
}
